package edu.xpu.cs.hub.controller;


import edu.xpu.cs.hub.entity.Process;
import edu.xpu.cs.hub.service.ProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author zaj
 * 提供节点信息、执行等
 */
@RestController
@RequestMapping("/process")
public class ProcessController {
    @Autowired
    ProcessService processService;

    @GetMapping("processInfo")
    public List<Process> nodeInfo(String nodesName){
        return processService.processInfo(nodesName);
    }

    @PostMapping("deleteProcess")
    public String deleteNodes(@RequestParam("processName") String processName){
        return processService.deleteProcess(processName);
    }

    @RequestMapping("excuteWorkflow")
    public String excuteWorkflow(){
        return null;
    }
}
